package com.zd.service.lmpl;/**
 * @Description: StartlistServicelmpl
 * @Author:pioneer
 * @Date: 2021-07-02
 * @Version:v1.0
 */

import com.zd.mapper.StartlistMapper;
import com.zd.service.lnter.StartlistServicelnter;
import com.zzg.entity.Startlist;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: StartlistServicelmpl
 * @Author:pioneer
 * @Date: 2021-07-02
 * @Version:v1.0
 */
@Service
public class StartlistServicelmpl implements StartlistServicelnter {

    @Autowired
    private StartlistMapper startlistMapper;
    /**
     * 查询所有发车信息
     *
     * @return 发车信息集合
     */
    @Override
    public List<Startlist> selectStartlist() {
        return startlistMapper.selectStartlist ();
    }

    /**
     * 分页查询
     *
     * @param page    页码
     * @param entries 条目数
     * @return 发车信息集合
     */
    @Override
    public List<Startlist> getPagingquery(int page, int entries) {
        return startlistMapper.getPagingquery ((page-1)*entries,entries);
    }

    /**
     * 通过运输协议id查询发车信息
     *
     * @param id 运输协议id
     * @return 发车对象
     */
    @Override
    public Startlist selectstartlistbyid(String id) {
        return startlistMapper.selectstartlistbyid (id);
    }

    /**
     * 通过多条件查询发车信息
     *
     * @param startlist 模型对象
     * @return 发车信息集合
     */
    @Override
    public List<Startlist> conditionalquery(Startlist startlist) {
        return startlistMapper.conditionalquery (startlist);
    }

    /**
     * 通过多条件查询发车信息并分页
     *
     * @param startlist 模型对象
     * @param page      页码
     * @param entries   条目数
     * @return 发车信息集合
     */
    @Override
    public List<Startlist> conditionalPagination(Startlist startlist, int page, int entries) {
        return startlistMapper.conditionalPagination (startlist,(page-1)*entries,entries);
    }
}
